//
//  HELExamVC.m
//  HandheldELearn
//
//  Created by 陈武琦 on 16/7/21.
//  Copyright © 2016年 陈武琦. All rights reserved.
//

#import "HELExamVC.h"
#import "HELMaterialExamVC.h"
#import "YSLContainerViewController.h"
@interface HELExamVC ()<YSLContainerViewControllerDelegate>

@end

@implementation HELExamVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = HexRGB_WSJ(242, 243, 244);
 

    [self titleView:@"我的考试"];
    [self setNavToBlue];
    [self setUp];
    // Do any additional setup after loading the view.
}

- (void)setUp {
    
    HELMaterialExamVC *materialVC = [[HELMaterialExamVC alloc] initWithExamType:1];
    materialVC.title = @"资料测验";
    HELMaterialExamVC *simulationVC = [[HELMaterialExamVC alloc] initWithExamType:2];
    simulationVC.title = @"模拟考试";
    HELMaterialExamVC *examingVC = [[HELMaterialExamVC alloc] initWithExamType:3];
    examingVC.title = @"正式考试";
    YSLContainerViewController *containerVC = [[YSLContainerViewController alloc]initWithControllers:@[materialVC,simulationVC,examingVC]
                                                                                        topBarHeight:0
                                                                                parentViewController:self];
    containerVC.delegate = self;
    containerVC.menuItemFont = [UIFont fontWithName:@"Futura-Medium" size:16];
    containerVC.menuItemTitleColor = [UIColor blackColor];
    containerVC.menuItemSelectedTitleColor = [UIColor redColor];
    containerVC.menuIndicatorColor = [UIColor redColor];
    containerVC.menuBackGroudColor = [UIColor whiteColor];
    [self.view addSubview:containerVC.view];
}


#pragma mark -- YSLContainerViewControllerDelegate
- (void)containerViewItemIndex:(NSInteger)index currentController:(UIViewController *)controller
{
    //    NSLog(@"current Index : %ld",(long)index);
    //    NSLog(@"current controller : %@",controller);
    //    [controller viewWillAppear:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
